import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpGoodKmData {
  id!: number;
  sort: number = 0;
  content?: unknown;
  state: number = 1;
  addTime?: string;
  updateTime?: string;
  orderId?: number;
  orderCode?: string;
  orderTime?: string;
  kmId!: number;
  uniacid!: number;
}

export const ImsYzdKpGoodKmDataSchema = new EntitySchema({
  class: ImsYzdKpGoodKmData,
  properties: {
    id: { primary: true, type: 'number' },
    sort: { type: 'number', default: 0 },
    content: { type: 'unknown', columnType: 'longtext', nullable: true },
    state: { type: 'number', default: 1 },
    addTime: { type: 'string', length: 255, nullable: true },
    updateTime: { type: 'string', length: 255, nullable: true },
    orderId: { type: 'number', nullable: true },
    orderCode: { type: 'string', length: 255, nullable: true },
    orderTime: { type: 'string', length: 255, nullable: true },
    kmId: { type: 'number' },
    uniacid: { type: 'number' },
  },
});
